package cn.lingyangwl.agile.food.core.model.rqrs.order;

import cn.lingyangwl.agile.food.model.constants.*;
import cn.lingyangwl.agile.model.constants.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 创建购物车订单请求
 *
 * @author shenguangyang
 */
@Getter
@Setter
public class CartOrderSaveReq extends OrderSaveBase {
    @ApiModelProperty(value = "购物车id")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    @Size(min = 1, message = "购物车最小数量必须大于1")
    private List<Long> cartIds;

    /**
     * @see ShopCons.GoodsType
     */
    @ApiModelProperty(value = "购物车类型")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    private String cartType;

    /**
     * @see ShopCons.DeliveryWay
     */
    @ApiModelProperty(value = "配送方式")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String deliveryWay;

    @ApiModelProperty(value = "桌号")
    private Long tableId;
}
